package com.student.work.common;

/**
 * 请求响应状态码
 * @date 2020/2/22 13:14
 */
public enum ResultCodeEnum {
    /**
     * 成功
     */
    SUCCESS(200, "SUCCESS", "请求成功！"),

    /**
     * 通用失败
     */
    ERROR(500, "ERROR", "请求失败"),

    /**
     * 用户名已存在
     */
    EXIST_NAME(501, "EXIST_NAME", "用户名已存在！"),

    /**
     * 手机号已注册
     */
    EXIST_MOBILE(502, "EXIST_MOBILE", "手机号已注册！"),

    /**
     * 用户名或密码错误
     */
    WRONG_USER(503, "WRONG_USER", "用户名或密码错误！"),

    /**
     * 用户未登录
     */
    UN_LOGIN(504, "UN_LOGIN", "用户未登录！"),

    /**
     * 工作id不能为空
     */
    EMPTY_JOB_ID(505, "EMPTY_JOB_ID", "工作id不能为空！"),

    /**
     * 参数缺失
     */
    LACK_PARAM(506, "LACK_PARAM", "参数缺失！"),

    /**
     * 不能申请自己发布的工作
     */
    UN_APPLY_YOURSEL(507, "UN_APPLY_YOURSEL", "不能申请自己发布的工作！"),

    /**
     * 上班卡已经打过
     */
    HAS_ATTENDANCE(508, "HAS_ATTENDANCE", "今日上班卡已经打过！"),

    /**
     * 上班卡未打
     */
    HAS_NOT_START(508, "HAS_NOT_START", "上班卡未打！"),
    ;

    private int statusNum;

    private String statusCode;

    private String statusInfo;

    ResultCodeEnum(int statusNum, String statusCode, String statusInfo) {
        this.statusNum = statusNum;
        this.statusCode = statusCode;
        this.statusInfo = statusInfo;
    }

    public int getStatusNum() {
        return statusNum;
    }

    public String getStatusCode() {
        return statusCode;
    }

    public String getStatusInfo() {
        return statusInfo;
    }
}
